package com.java.exer_2;

/**
 * @author luzhikun
 * @date 2020/12/15-21:13
 */
public class SalariedEmployee extends Employee {
    private double mounthlySalary;

    public SalariedEmployee(double mounthlySalary) {
        this.mounthlySalary = mounthlySalary;
    }

    public SalariedEmployee(String name, int number, MyDate birthday, double mounthlySalary) {
        super(name, number, birthday);
        this.mounthlySalary = mounthlySalary;
    }

    public double getMounthlySalary() {
        return mounthlySalary;
    }

    public void setMounthlySalary(double mounthlySalary) {
        this.mounthlySalary = mounthlySalary;
    }

    @Override
    public double earnings() {
        return mounthlySalary;
    }

    public String toString() {
        return super.toString();
    }

}